import request from '@/utils/request';

export async function getProductInfoByPage(params: any) {
  return request('/api/project/getProductInfoByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addProductInfo(params: any) {
  return request('/api/project/addProductInfo', {
    method: 'POST',
    data: params,
  });
}

export async function updateProductInfo(params: any) {
  return request('/api/project/updateProductInfo', {
    method: 'POST',
    data: params,
  });
}

export async function delProductInfo(params: any) {
  return request('/api/project/delProductInfo', {
    method: 'POST',
    data: params,
  });
}

export async function exportProductInfo(params: any) {
  return request('/api/project/exportProductInfo', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default {
  getProductInfoByPage,
  addProductInfo,
  updateProductInfo,
  delProductInfo,
  exportProductInfo,
};
